﻿<%@ Page Language="C#" MasterPageFile="~/Shared/MainPage.Master" AutoEventWireup="true" CodeBehind="NoticeMNG.aspx.cs" Inherits="Runda.CMS.Portal.Workspace.NoticeMNG" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cphHead" runat="server">
    <script src="../Content/global.js" type="text/javascript"></script>     
    <link href="../Content/global.css" rel="stylesheet" type="text/css" />
    <link href="../Content/Menu/Menu.css" rel="stylesheet" type="text/css" /> 
   <link href="../Content/Grid/Grid.css" rel="stylesheet" type="text/css" /> 
    <script src="../Content/Grid/map_grid.js" type="text/javascript" ></script>
    <link href="../Content/Pager.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
        function OpenNotice(value) {
            openMyFullWin('Notice_Edit.aspx?NoticeID=' + value, 'editNotice');
        }
        function getids() {           
            var arrTr = grid.getSelected();
            if (arrTr.length > 0) {
                if (!confirm('确认删除此明细?')) {
                    return;
                }    
                var ids = "";
                for (var i = 0; i < arrTr.length; i++) {
                    if (ids != "") {
                        ids += ";";
                    }
                    ids += arrTr[i].oid;
                }
                document.getElementById('<%=noticeids.ClientID %>').value = ids;
                document.getElementById('<%=lnkbtnDelete.ClientID %>').click();
            }
        }                 
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphBody" runat="server">
 <div class="Container">
         
         <table class="mnubar" cellspacing="0" cellpadding="0">
            <tbody>
                <tr>
                    <td style="padding-left: 5px" nowrap>
                        <b>公告列表</b>
                    </td>
                    <td style="padding-left: 5px">
                        <img src="../Content/Grid/separator.gif">
                    </td>
                    <td class="icMenu" nowrap>
                        <span class="menu" tabindex="0" menu="appGridMenu_mainmnu">操作<img src="../Content/Grid/mnuDown.gif">
                            <table id="appGridMenu_mainmnu" class="mnuList" cellspacing="0" cellpadding="3">
                                <colgroup>
                                    <col class="mnuLeft">
                                    <col class="mnuItm">
                                    <col align="right" width="20">
                                    <tbody>
                                        <tr tabindex="0"  action="getids()">
                                            <td>
                                            </td>
                                            <td colspan="2" nowrap>
                                                <asp:LinkButton ID="lnkbtnDelete" runat="server" onclick="lnkbtnDelete_Click">删除</asp:LinkButton>
                                                <input type="hidden" runat="server" id="noticeids" />
                                            </td>
                                        </tr>
                                    </tbody>
                            </table>
                        </span>
                    </td>
                    <td class="icMenu mnuRight" nowrap>
                        <span class="menu"  onclick="openMyFullWin('Notice_Edit.aspx','addNotice');">
                            <img class="mnuBtn" src="../Content/Grid/New_16_blue.gif"><span class="mnuBtn">新增公告</span></span>
                    </td>
                </tr>
            </tbody>
        </table>       
         
        <div style="border-bottom: #c2c2bf 1px solid; border-top: #969693 1px solid">
        </div>
             <asp:Repeater ID="RepeaterNotice" runat="server" 
                 onitemcommand="RepeaterNotice_ItemCommand" 
             onitemdatabound="RepeaterNotice_ItemDataBound">
                 <HeaderTemplate>
                    <table id="grid" class="grid" cellspacing="0" cellpadding="0">
            <tbody>
                <tr class="header">
                    <td align="middle" style="width:84%"> 
                    <div><div style="display:inline;float:left;height:auto; overflow:hidden;width:96%;text-align:center;">公告内容</div>
                        <div style="display:inline;float:right;height:auto; overflow:hidden;"><img src="../Content/Grid/bar_line.gif" border="0"></div>
                        </div>
                    </td>
                   
                     <td align="middle" style="width:10%"> 
                    <div><div style="display:inline;float:left;height:auto; overflow:hidden;width:96%;text-align:center;">时间</div>
                        <div style="display:inline;float:right;height:auto; overflow:hidden;"><img src="../Content/Grid/bar_line.gif" border="0"></div>
                        </div>
                    </td> 
                    <td align="middle" style="width:5%"> 
                    <div><div style="display:inline;float:left;height:auto; overflow:hidden;width:96%;text-align:center;">发起人</div>
                        <div style="display:inline;float:right;height:auto; overflow:hidden;"><img src="../Content/Grid/bar_line.gif" border="0"></div>
                        </div>
                    </td> 
                    <td  style="width:1%">
                        <asp:ImageButton ID="imgbtnRefersh" CommandName="refersh" runat="server" ImageUrl="../Content/Grid/grid_Refresh.gif" AlternateText="刷新列表"/> 
                    </td>
                </tr>
                 </HeaderTemplate>
                 <ItemTemplate>
                  <tr class="data" ondblclick="OpenNotice('<%#Eval("NoticeID") %>')" onclick="handleClick()" oid='<%# Eval("NoticeID")%>'>
                    <td class="tdautolen"><asp:Label runat="server" ID="NoticeContent" Text='<%# Eval("NoticeContent")%>' ToolTip='<%# Eval("NoticeContent")%>'></asp:Label></td> 
                    <td><%#Eval("NoticeTime")%></td>     
                    <td><asp:Label runat="server" ID="CreatedBy" Text='<%# Eval("CreatedBy")%>' Visible="false"></asp:Label>
                        <asp:Label ID="CreatedByName" runat="server" Text="Label"></asp:Label>
                    </td>                       
                    <td></td>
                </tr>
                 </ItemTemplate>
                 <FooterTemplate>
                    </tbody>
                </table>  
                 </FooterTemplate>
             </asp:Repeater>    
               <webdiyer:AspNetPager ID="AspNetPager1" runat="server" CssClass="paginator"  
                            CurrentPageButtonClass="cpb" 
                            CustomInfoHTML="第%CurrentPageIndex%页，共%PageCount%页，每页%PageSize%条" 
                            FirstPageText="首页" LastPageText="尾页" NextPageText="下一页" PrevPageText="上一页" 
                            ShowCustomInfoSection="Left" Width="100%" LayoutType="Table"  
                            SubmitButtonClass="but" SubmitButtonText="转到" OnPageChanged="AspNetPager1_PageChanged">
                        </webdiyer:AspNetPager>    
         </div>
    <asp:Button ID="btnRefersh" runat="server" Text="Button" style="display:none" onclick="btnRefersh_Click" />
</asp:Content>
